<%@ page language="java" pageEncoding="utf-8"%>

<!DOCTYPE html>
<html>
<head>
	<%@include file="../include_new.jsp"%>
</head>
<body id="z_body">
<div id="app">
	<form class="form-horizontal" id="form_1">
	
		<div class="form-group">
			<label class="col-xs-3">*账号</label>
			<div class="col-xs-7">
				<input class="form-control" name="zh" validType="notEmpty">
			</div>
		</div>
	
		<div class="form-group">
			<label class="col-xs-3">*密码</label>
			<div class="col-xs-7">
				<input class="form-control" name="mm" type="password" validType="notEmpty">
			</div>
		</div>
	
		<div class="form-group">
			<label class="col-xs-3">*名称</label>
			<div class="col-xs-7">
				<input class="form-control" name="mc" validType="notEmpty">
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-xs-3">*所属单位</label>
			<div class="col-xs-7">
				<input class="form-control" name="ssdwdm" validType="" type="hidden">
				<input class="form-control" name="ssdwmc" validType="notEmpty" data_tree="{type:'organ'}">
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-xs-3">代理单位</label>
			<div class="col-xs-7">
				<input class="form-control" name="dldwdm" validType="" type="hidden">
				<input class="form-control" name="dldwmc" validType="" data_tree="{type:'organ', multi:true}">
			</div>
		</div>
	
		<div class="form-group">
			<label class="col-xs-3">电话</label>
			<div class="col-xs-7">
				<input class="form-control" name="dh" validType="">
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-xs-3"></label>
			<div class="col-xs-7">
				<a class="btn btn-primary" onclick="save()">保存</a> &nbsp;
				<a class="btn" onclick="parent.closeModal()">取消</a>
			</div>
		</div>
		
	</form>
</div>
	
<script type="text/javascript">
	//保存
	function save() {
		if(validateForm("form_1")) {//表单验证
			tool.save("../user/add", $("#form_1").serialize(), function(data) {//提交
				parent.getPage();
				setTimeout(function(){
					window.location = "../user/form?act=update&id="+data;
				}, 800);
			});
		}
	}
</script>
<style type="text/css">
	#z_body{min-height:500px;}
</style>
</body>
</html>